# -*- mode: snippet -*-
# name : open
# --
open(${1:const char *filename}, ${2:O_RDONLY}${2:$(if
               (string-match "O_CREAT" text)
               ", S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH" "\);")}${2:$(if
               (string-match "O_CREAT" text) "\);" "")}$0